package com.laowang.project.system.service.impl;

import java.util.List;
                                                                import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.laowang.project.system.mapper.MyGoodsCatMapper;
import com.laowang.project.system.domain.MyGoodsCat;
import com.laowang.project.system.service.MyGoodsCatService;

/**
 * 商品分类Service业务层处理
 *
 * @author laowang
 * @date 2023-07-20
 */
@Service
public class MyGoodsCatServiceImpl implements MyGoodsCatService {
    @Autowired
    private MyGoodsCatMapper myGoodsCatMapper;

    /**
     * 查询商品分类
     *
     * @param id 商品分类ID
     * @return 商品分类
     */
    @Override
    public MyGoodsCat selectMyGoodsCatById(Integer id) {
        return myGoodsCatMapper.selectMyGoodsCatById(id);
    }

    /**
     * 查询商品分类列表
     *
     * @param myGoodsCat 商品分类
     * @return 商品分类
     */
    @Override
    public List<MyGoodsCat> selectMyGoodsCatList(MyGoodsCat myGoodsCat) {
        return myGoodsCatMapper.selectMyGoodsCatList(myGoodsCat);
    }

    /**
     * 新增商品分类
     *
     * @param myGoodsCat 商品分类
     * @return 结果
     */
    @Override
    public int insertMyGoodsCat(MyGoodsCat myGoodsCat) {
                                                                                                                    return myGoodsCatMapper.insertMyGoodsCat(myGoodsCat);
    }

    /**
     * 修改商品分类
     *
     * @param myGoodsCat 商品分类
     * @return 结果
     */
    @Override
    public int updateMyGoodsCat(MyGoodsCat myGoodsCat) {
                                                                                                                    return myGoodsCatMapper.updateMyGoodsCat(myGoodsCat);
    }

    /**
     * 批量删除商品分类
     *
     * @param ids 需要删除的商品分类ID
     * @return 结果
     */
    @Override
    public int deleteMyGoodsCatByIds(Integer[] ids) {
        return myGoodsCatMapper.deleteMyGoodsCatByIds(ids);
    }

    /**
     * 删除商品分类信息
     *
     * @param id 商品分类ID
     * @return 结果
     */
    @Override
    public int deleteMyGoodsCatById(Integer id) {
        return myGoodsCatMapper.deleteMyGoodsCatById(id);
    }
}
